config := meta.(*Config)
project, err := getProject(d, config)
if err != nil {
  return nil, err
}

zone, err := getZone(d, config)
if err != nil {
	return nil, err
}
if zone == "" {
	return nil, fmt.Errorf("zone must be non-empty - set in resource or at provider-level")
}

// resourcePolicies are referred to by region but affixed to zonal disks.
// We construct the regional name from the zone:
//   projects/{project}/regions/{region}/resourcePolicies/{resourceId}
region := getRegionFromZone(zone)
if region == "" {
	return nil, fmt.Errorf("invalid zone %q, unable to infer region from zone", zone)
}

obj["resourcePolicies"] = []interface{}{fmt.Sprintf("projects/%s/regions/%s/resourcePolicies/%s", project, region, obj["name"])}
delete(obj, "name")
return obj, nil
